﻿<basics:ChildWindow
	xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
	xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
	xmlns:basics="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls"
	xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
	xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
	mc:Ignorable="d" 
	xmlns:SilverMap_Editor_Converters="clr-namespace:SilverMap.Editor.Converters"
	x:Class="SilverMap.Editor.GridDetailsWindow"
	Title="Grid Details"
	Width="400" Height="300">
	<basics:ChildWindow.Resources>
		<SilverMap_Editor_Converters:SizeConverter x:Key="SizeConverter"/>
	</basics:ChildWindow.Resources>
	<Grid x:Name="LayoutRoot" Background="White">
		<Grid.RowDefinitions>
			<RowDefinition />
			<RowDefinition Height="Auto" />
		</Grid.RowDefinitions>

		<Button x:Name="OKButton" Content="OK" Click="OKButton_Click" Width="75" Height="23" HorizontalAlignment="Right" Grid.Row="1" />
		<Button x:Name="CancelButton" Content="Cancel" Click="CancelButton_Click" Width="75" Height="23" HorizontalAlignment="Right"  Margin="0,0,79,0" Grid.Row="1" />
		<TextBlock HorizontalAlignment="Left" Margin="8,8,0,0" VerticalAlignment="Top" Text="Grid Size:" TextWrapping="Wrap"/>
		<TextBlock HorizontalAlignment="Left" Margin="8,78,0,0" VerticalAlignment="Top" Text="Tile Alignment:" TextWrapping="Wrap"/>
		<TextBlock HorizontalAlignment="Left" Margin="67,36,0,0" Text="Width" TextWrapping="Wrap" VerticalAlignment="Top" Width="50" TextAlignment="Center"/>
		<TextBox x:Name="GridWidthTextBox" HorizontalAlignment="Left" VerticalAlignment="Top" Text="{Binding GridSize, Converter={StaticResource SizeConverter}, ConverterParameter=Width, Mode=TwoWay}" TextWrapping="Wrap" Margin="67,8,0,0" Width="50" TextAlignment="Center"/>
		<TextBox x:Name="GridHeightTextBox" HorizontalAlignment="Left" Margin="121,8,0,0" VerticalAlignment="Top" Width="50" Text="{Binding GridSize, Converter={StaticResource SizeConverter}, ConverterParameter=Height, Mode=TwoWay}" TextWrapping="Wrap" TextAlignment="Center"/>
		<TextBlock HorizontalAlignment="Left" Margin="121,36,0,0" Text="Height" TextWrapping="Wrap" VerticalAlignment="Top" Width="50" TextAlignment="Center"/>
		<RadioButton x:Name="AlignTopLeft" HorizontalAlignment="Left" VerticalAlignment="Top" Content="Top, Left" Margin="96,78,0,0" GroupName="Alignment" IsChecked="{Binding Alignment, Converter={StaticResource ItemAlignmentConverter}, ConverterParameter=TopLeft, Mode=TwoWay}"/>
		<RadioButton x:Name="AlignTopRight" HorizontalAlignment="Left" Margin="96,99,0,0" VerticalAlignment="Top" Content="Top, Right" GroupName="Alignment" IsChecked="{Binding Alignment, Converter={StaticResource ItemAlignmentConverter}, ConverterParameter=TopRight, Mode=TwoWay}"/>
		<RadioButton x:Name="AlignBottomLeft" HorizontalAlignment="Left" Margin="96,120,0,105" Content="Bottom, Left" GroupName="Alignment" d:LayoutOverrides="Height" IsChecked="{Binding Alignment, Converter={StaticResource ItemAlignmentConverter}, ConverterParameter=BottomLeft, Mode=TwoWay}"/>
		<RadioButton x:Name="AlignBottomRight" HorizontalAlignment="Left" Margin="96,0,0,84" Content="Bottom, Right" GroupName="Alignment" VerticalAlignment="Bottom" IsChecked="{Binding Alignment, Converter={StaticResource ItemAlignmentConverter}, ConverterParameter=BottomRight, Mode=TwoWay}"/>
	</Grid>
</basics:ChildWindow>